﻿Public Module PowerPointGenericOperations
    Public Sub TerminatePPProcess(ByVal Application As Microsoft.Office.Interop.PowerPoint.Application)
        For Each Presentazione As Microsoft.Office.Interop.PowerPoint.Presentation In Application.Presentations
            For Each Slide As Microsoft.Office.Interop.PowerPoint.Slide In Presentazione.Slides
                System.Runtime.InteropServices.Marshal.ReleaseComObject(Slide)
            Next
            System.Runtime.InteropServices.Marshal.ReleaseComObject(Presentazione)
        Next
        System.Runtime.InteropServices.Marshal.ReleaseComObject(Application)
    End Sub
End Module